package com.example.demo.controller;

import cn.dev33.satoken.stp.StpUtil;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: wn
 * @Date: 2021/8/3 14:42
 * @Version 1.0
 * @Note
 */
@Api(tags = "thingsboard测试")
@RestController
//@RequestMapping("/test")
public class TBController {

    @RequestMapping("getdata")
    public boolean getdata(HttpServletRequest request, HttpServletResponse response) {
        System.out.println(request.getParameter("deviceName"));
        return true;
    }

    @RequestMapping("sensor/{deviceName}/{attributeKey}")
    public boolean sensor(@PathVariable(name = "deviceName") String deviceName,@PathVariable(name = "attributeKey") String attributeKey) {
        System.out.println(deviceName);
        System.out.println(attributeKey);
        return true;
    }

}
